package myserver;

import java.awt.BorderLayout;

import javax.swing.*;

public class ServerFrame {
	
	public static JTextArea area = new JTextArea();
	
	ServerFrame(){
		JFrame frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setBounds(400, 400, 500, 300);
		
		//左边的用户列表panel
		JPanel pnLeft = new JPanel();
//		JLabel leftLb = new JLabel();
//		JPanle 
		JScrollPane scrollPane = new JScrollPane(area);
//		scrollPane.add(area);
		
		JButton btMs = new JButton("查看信息");
		JButton btOut = new JButton("踢出");
		JLabel lbPerson = new JLabel("在线人数");
		pnLeft.add(btMs);
		pnLeft.add(btOut);
		pnLeft.add(lbPerson);
		
//		JPanel pnRight = new JPanel();
//		pnRight.setLayout(new BorderLayout());
//		pnRight.add(scrollPane, BorderLayout.CENTER);
		area.setEnabled(false);
		
		JPanel pn = new JPanel();
		pn.setLayout(new BorderLayout());
		pn.add(pnLeft, BorderLayout.WEST);
		pn.add(scrollPane, BorderLayout.CENTER);
		
		frame.getContentPane().add(pn);
		
		frame.setVisible(true);
	}

}
